package com.person.controller;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author zhangfc
 * @date 2021/6/27 22:50
 */
@RestController
@RefreshScope //实现自动刷新动态配置的注解  若git
public class ConfigClientController {

    /*@Value("${server-port}")
    private String serverPort;*/

    @Value("${lease-renewal-interval-in-seconds}")
    private String configInfo;

    @GetMapping("/configInfo")
    public String getConfigInfo() {
        return /*serverPort+"\n"+*/configInfo;
    }
}
